|
![](/i/fill.gif) |
Raf256 <spa### [at] raf256 invalid> wrote:
> This trivial task turns out very hard, one have to create 3 or 6 shapes each
> with different texture and try to combine them. It not always work, and it
> is an ugly hack imho.
No, one have not. I have posted this before:
camera { location -z*6 look_at 0 angle 35 }
light_source { <15, 20, -50>, 2 }
#declare Pyramid = function { abs(x) < y & abs(z) < y };
#declare CubePattern =
function
{ Pyramid(x, -z, y)*1/6+
Pyramid(y, x, z)*2/6+
Pyramid(x, z, y)*3/6+
Pyramid(y, -x, z)*4/6+
Pyramid(x, -y, z)*5/6
};
#declare Image =
pigment
{ image_map { jpeg "image" }
translate -.5
scale 2
};
#declare ThePigment =
pigment
{ function { CubePattern(x, y, z) }
pigment_map
{ [0/6 Image rotate x*90]
[1/6 Image]
[2/6 Image rotate -y*90]
[3/6 Image rotate -y*180]
[4/6 Image rotate y*90]
[5/6 Image rotate -x*90]
}
};
superellipsoid
{ <.2, .2>
pigment { ThePigment }
rotate y*30 rotate x*-30
}
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |